package org.testmyapp.entities;


public class CoveragePk {

	public Integer tarifDefinition;
	public Integer claimType;

	public CoveragePk() {

	}

	public CoveragePk(Integer tarifDefinition, int claimType) {
		this.tarifDefinition = tarifDefinition;
		this.claimType = claimType;
	}

	@Override
	public boolean equals(Object other) {
		if (other == null) {
			return false;
		}
		if (!other.getClass().equals(this.getClass())) {
			return false;
		}
		CoveragePk otherObject = (CoveragePk) other;
		if (otherObject == this) {
			return true;
		}
		if (tarifDefinition != null && otherObject.tarifDefinition != null
				&& tarifDefinition.equals(otherObject.tarifDefinition)) {
			if (claimType != null && otherObject.claimType != null
					&& claimType.equals(otherObject.claimType)) {
				return true;
			}
		}
		return false;
	}
	
	@Override
	public int hashCode() {
		if(tarifDefinition == null || claimType == null) {
			return 0;
		}
		else {
			return tarifDefinition.hashCode() ^ claimType.hashCode();
		}
	}
	
}
